<!DOCTYPE html>
<html>
<head>
  <title></title>
  <style type="text/css">
    .td{
      background:yellow;
      border: 1px solid blue;
      text-align:center;
      width: 100px;
    }
  </style>
</head>
<body>
<?php
  $ii=1;
    $arr = ['李涛','刘永健','陈逍逍','王松','方福贵','刘宇','卢金路','陈呈','谢广国','徐言','刘帅','张腾达','朱怀三','赵建松','谢磊','李锋','许量','李天昊','朱雷','黄月扬','苏杰','汪海蕾','王元龙','周学文'];
    $arrfs=[];
    $arrzfs=[];
  $count=count($arr);
  for($i=0;$i<$count;$i++){
        $arrt=[];
        $t=0;
       for($j=0;$j<6;$j++){
        $arrt[$j]=rand(0,100);
        $t+=$arrt[$j];
       }
       $arrfs[$arr[$i]]=$arrt;
       $arrzfs[$arr[$i]]=$t;
  }
  arsort( $arrzfs);
  echo "<table>";
    echo "<tr>";
        echo "<th class='td'>姓名</th>";
        echo "<th class='td'>语文</th>";
        echo "<th class='td'>数学</th>";
        echo "<th class='td'>英语</th>";
        echo "<th class='td'>化学</th>";
        echo "<th class='td'>物理</th>";
        echo "<th class='td'>政治</th>";
        echo "<th class='td'>总分</th>";
        echo "<th class='td'>名次</th>";
        echo "</tr>";
      foreach ($arrzfs as $key => $value) {
        echo "<tr>";
        echo "<td class='td'>".$key."</td>";
        echo "<td class='td'>".$arrfs[$key][0]."</td>";
        echo "<td class='td'>".$arrfs[$key][1]."</td>";
        echo "<td class='td'>".$arrfs[$key][2]."</td>";
        echo "<td class='td'>".$arrfs[$key][3]."</td>";
        echo "<td class='td'>".$arrfs[$key][4]."</td>";
        echo "<td class='td'>".$arrfs[$key][5]."</td>";
        echo "<td class='td'>".$value."</td>";
        echo "<td class='td'>".$ii++."</td>";
        echo "</tr>";
      }
  echo "</table>";
  ?>

</body>
</html>